#!/usr/bin/env python

#        +-----------------------------------------------------------------------------+
#        | GPL                                                                         |
#        +-----------------------------------------------------------------------------+
#        | Copyright (c) Mattia Lambertini <lamberti@cs.unibo.it>                      |
#        |                                                                             |
#        | This program is free software; you can redistribute it and/or               |
#        | modify it under the terms of the GNU General Public License                 |
#        | as published by the Free Software Foundation; either version 2              |
#        | of the License, or (at your option) any later version.                      |
#        |                                                                             |
#        | This program is distributed in the hope that it will be useful,             |
#        | but WITHOUT ANY WARRANTY; without even the implied warranty of              |
#        | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               |
#        | GNU General Public License for more details.                                |
#        |                                                                             |
#        | You should have received a copy of the GNU General Public License           |
#        | along with this program; if not, write to the Free Software                 |
#        | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. |
#        +-----------------------------------------------------------------------------+

import os

__author__="mattia"
__date__ ="$Aug 25, 2009 10:19:18 AM$"

KEYWORDS = 'GLADE_FILE', 'POSTIT_IMG', 'CLOSE_IMG', 'HIDE_CLOSE_IMG', 'DB_NAME'

def _init_global_variables():
    """ Read the config.txt file and initialize the global variable"""
    print "_init_global_variables()"
    VARIABLES = dict()
    file = open(os.environ['HOME'] + "/NetBeansProjects/loveNote/src/love/config.txt")
    for line in file:
        if line.strip() != "":
            t = line.partition('=')
            key = t[0].strip()
            if key in KEYWORDS:
                value = t[2].replace('"', ' ').strip()
                VARIABLES[key] = value
    file.close()
    return VARIABLES


VARIABLES = _init_global_variables()


if __name__ == "__main__":
    
   _init_global_variables()